<template>
    <div>
        <van-nav-bar title="搜索" />
        <van-search v-model="value" shape="round" background="cornflowerblue" placeholder="请输入搜索关键词" />

        <van-cell-group v-for="item in ss">
            <van-cell :title="item.goods_name" value="内容" />
          
        </van-cell-group>
    </div>
</template>

<script setup>
import { qsearchApi } from '@/api/api';
import { ref, watch } from 'vue';
let value = ref('')
let ss = ref([]);
watch(value, (val) => {
    qsearchApi(val).then(res => {
        console.log("搜索", res);
        ss.value=res.data.message;
    })
})

</script>

<style lang="scss" scoped></style>